
// 常量路由管理
export const constantRoute = [
    {
        path:'/login',
        name:'Login',
        component:()=> import('@/view/login/login.vue'),
        meta:{
            title: '登陆',
            hidden: true
        },
    },
    {
        path: '/',
        name: 'layout',
        component: () => import('@/layout/index.vue'),
        redirect: '/home',
        meta: {
            title: '首页',
            hidden: false,
        },
        children: [
            {
                path: '/Home',
                name: 'Home',
                meta: {
                    title: '首页',
                    hidden: false,
                    icon: 'DataAnalysis',
                },
                component: () => import('@/view/Home/Home.vue')
            },
        ]
    },
    {
        path:'/404',
        name:'404',
        component:()=> import('@/view/404/404.vue'),
        meta:{
            title: '404',
            hidden: true
        }
    }
]

// 异步路由
export const asyncRoute = 
    [
        {
            path:'/User',
            name:'User',
            component:()=> import('@/view/User/User.vue'),
            meta:{
                title: '用户管理',
                hidden: false,
                icon:'User'
            },
        },
        {
            path:'/Role',
            name:'Role',
            component:()=> import('@/view/Role/Role.vue'),
            meta:{
                title: '角色管理',
                hidden: false,
                icon:'Postcard'
            },
        },
        {
            path:'/Menu',
            name:'Menu',
            component:()=> import('@/view/Permission/Permission.vue'),
            meta:{
                title: '菜单管理',
                hidden: false,
                icon:'SetUp'
            },
        },
        {
            path:'/Department',
            name:'Department',
            component:()=> import('@/view/Department/Department.vue'),
            meta:{
                title: '部门管理',
                hidden: false,
                icon:'Suitcase'
            },
        },
        {
            path:'/Position',
            name:'Position',
            component:()=> import('@/view/Position/Position.vue'),
            meta:{
                title: '职位管理',
                hidden: false,
                icon:'SuitcaseLine'
            },
        },
        {
            path:'/Operation',
            name:'Operation',
            component:()=> import('@/view/Operation/Operation.vue'),
            meta:{
                title: '操作日志',
                hidden: false,
                icon:'Guide'
            },
        },
        {
            path:'/Log',
            name:'Log',
            component:()=> import('@/view/Loginfo/Loginfo.vue'),
            meta:{
                title: '登陆日志',
                hidden: false,
                icon:'Location'
            },
        },
        {
            path:'/Notice',
            name:'Notice',
            component:()=> import('@/view/Notice/Notice.vue'),
            meta:{
                title: '通知公告',
                hidden: false,
                icon:'Tickets'
            },
        },
    ]
// 任意路由
export const anyRoute =[
    {
        path:'/:pathMatch(.*)*',
        name:'Any',
        redirect:'/404',
        meta:{
            title:'any',
            hidden:true
        }
    }
]